<!doctype html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>健康管理系统</title>
	<link th:href="@{/css/styles.css}" rel="stylesheet">
	<link th:href="@{/css/jigsaw.css}" rel="stylesheet">
</head>
<body id="main">
	<div class="jq22-container" style="padding-top:100px">
		<div class="login-wrap">
			<div class="login-html">
				<input id="tab-1" type="radio" name="tab" class="sign-up" checked><label for="tab-1" class="tab">登录</label>
				<div class="login-form">
					<form id="form-login" th:action="@{/login}" method="post">
					<div class="sign-up-htm">
						<div id="msg" style="width: 100%;line-height: 40px;color: red;font-size: 14px;text-align: center">[[${msg}]]</div>
						<div class="group">
							<label class="label">用户名</label>
							<input id="username" name="username" value="admin" type="text" class="input">
						</div>
						<div class="group">
							<label class="label">密码</label>
							<input id="password" name="password" type="password"  value="333" class="input" data-type="password">
						</div>
						<div class="group">
							<input type="submit" class="button" value="登录">
						</div>
					</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<script th:src="@{/js/jigsaw.js}"></script>
	<div th:replace="common :: common"></div>
<script>
	$(function () {
		$("#form-login").validate({
			submitHandler: function(form){
				form.submit();   //提交表单
			},
			rules:{
				password:{
					required: true
				},
				username:{
					required: true
				},
			},
		});
	});

</script>
</body>
</html>